//
// Created by enemy1205 on 2021/8/16.
//
#pragma once
#include <opencv2/core/mat.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/parallel/parallel_backend.hpp>

class BGR2Binary{
public:
    BGR2Binary(cv::Mat &, cv::Mat &, uint8_t &,int);        //构造函数
    void operator()(const cv::Range &range) const;   // 重载()运算符
    inline cv::Mat* getResult(){return pBinImg;}
private:
    cv::Mat *pSrcImg;
    cv::Mat *pBinImg;
    uint8_t *pColorMode;
    int thresh;
};
extern cv::Mat Pretreatment(cv::Mat &img, uint8_t ENEMY, uint8_t ,int thresh, int ksize);

